import { createRouter, createWebHistory } from "vue-router";
import Layout from "@/Layout/header/index.vue";

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    name: "Home",
    component: Layout,
    children: [
      {
        path: "/home",
        name: "Home",
        component: () => import("@/view/Home/index.vue"),
      },
    ],
  },
  {
    path: "/qrTemp",
    name: "QrTemp",
    component: Layout, // 懒加载
    children: [
      {
        path: "/qrTemp",
        name: "QrTemp",
        component: () => import("@/view/QrTemp/index.vue"),
      },
    ],
  },
];
const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
